In mathematics, the colexicographic or colex order, is a natural order structure of the Cartesian product of two or more ordered sets. It is similar in structure to the lexicographical order. Colexicographical ordering is used in the Kruskal-Katona theorem.
Given two partially ordered sets A and B, the colexicographical order on the Cartesian product A × B is defined as
The result is a partial order. If A and B are totally ordered, then the result is a total order also.
More generally, one can define the colexicographic order on the Cartesian product of n ordered sets.
Suppose
is an n-tuple of sets, with respective total orderings
The colex ordering
of
is then
The following is an ordering on subsets of size 3 from the set , based on the colex ordering of the triples obtained by writing the elements of each subset in ascending order:
Colexicographic order in the OEIS-Wiki